/*
 * @Description: 获取店铺信息
 * @Author: along
 * @Date: 2020-04-06
 * @Last Modified by: along
 * @Last Modified time: --
 */
export default {
    methods: {
        getCompanyInfo(callback) {
            let _this = this;

            this.$post('', {}).then(resp => {
                if (resp.code == 1) {
                    if (resp.data !== null) {
                        _this.$store.commit('companyInfo/SET_COMPANY_INFO', resp.data);
                        if(callback){
                            callback();
                        }
                    }
                } else {
                    _this.$notify.error({
                        title: '错误',
                        duration: 2000,
                        message: resp.msg || '获取公司信息失败，请稍后重试'
                    });
                }
            });
        }
    }
};